'use strict'
import 'whatwg-fetch'
import React from 'react'
import { Route, BrowserRouter, Switch } from 'react-router-dom'
import List from './list'
import Live from './live'
import Set from './setting'
// import Charge from './setting/charge'
import Invitation from './setting/invitation'
import Message from './setting/message'
import Record from './setting/record'
import Share from './setting/share'
import { Provider } from 'mobx-react'
import stores from '../stores'
class Index extends React.Component {
  render () {
    return (
      <Provider {...stores}>
        <BrowserRouter>
          <Switch>
            <Route exact path="/" component={List}></Route>
            <Route exact path="/list" component={List}></Route>
            <Route exact path="/live/:roomID/:anchorID" component={Live}></Route>
            <Route exact path="/set" component={Set}></Route>
            {/* <Route exact path="/set/charge" component={Charge}></Route> */}
            <Route exact path="/set/invitation" component={Invitation}></Route>
            <Route exact path="/set/message" component={Message}></Route>
            <Route exact path="/set/record" component={Record}></Route>
            <Route exact path="/set/share" component={Share}></Route>
          </Switch>
        </BrowserRouter>
      </Provider>
    )
  }
}

export default Index
